In a network environment, one or more network devices may be employed to direct the flow of data packets flowing between the devices located on the network. To prevent any one network device from being overloaded, load balancing may be performed. As discussed herein, load balancing refers to a technique for maximizing resource utilization and minimizing response time by distributing workloads.
To facilitate discussion, FIG. 1 shows a simple block diagram of a network device with a ten gigabit backbone structure. Network device 102 may be a router, a switch, a tap device, and the like. Network device 102 may include a plurality of network ports (104, 106, 108, 110, 112, 114, 116, 118, and 120). Port 104 may be configured to handle up to ten gigabits of data while ports 106-120 may only be configured to handle up to one gigabit of data.
Consider the situation wherein, for example, a data stream consisting of data packets ABCDEFGHIJ is being received by network device 102 at port 104. Once received by network device 102, the data packets ABCDEFGHIJ may be distributed among different ports. Since each port is only capable of supporting up to one gigabit of data traffic at any one time, the data packet has to be no larger than one gigabit.
In order to provide for maximum resource utilization and to minimize response time, load balancing may be performed. In some network devices, the criteria for load balancing may be set by the user. In an example, the user may provide detailed instructions on how the data traffic may be distributed among the various network ports. Unfortunately, this method of load balancing tends to be tedious and requires the user to have a fairly extensive understanding of the data traffic through the network.
Also, the user may not be able to define the traffic flow such that all data packets from the same conversation are routed through the same port. As a result, data packets may not arrived at the destination in order. Thus, additional resources may be required to reorder the data packets.
Further, if the data stream being routed through a particular port is larger than what the port can handle, some of the data packets may be dropped, especially if the port does not have a buffer in place to handle the overload. Even if a buffer is in place, some buffers may not be sufficient to handle the entire overload and some data packets may be dropped.
Load balancing may also be performed automatically. Network devices, such as devices that support the IEEE 802.3ad link aggregation standard, may provide for automatic load balancing through a hashing algorithm. The hashing algorithm is an algorithm that may allow the system to automatically distribute data traffic based on a predefined set of rules (see example of rules in Table 1 below).
TABLE 1Modes of HashingModeHashing Rules1Source address, Virtual Local Area Network (VLAN)identification number (ID), EtherType, Source module, and port ID2Destination address, Virtual Local Area Network (VLAN)identification number (ID), EtherType, Source module, and port ID3SA-XOR-DA (formula for using source and destination addresses),Virtual Local Area Network (VLAN) identification number (ID),EtherType, Source module, and port ID4SIP (source internet protocol address) and source TCP/UDP(transmission control protocol/user datagram protocol)port5DIP (destination internet protocol address) and destinationTCP/UDP port6SIP-XOR-DIP (formula using source and destination addresses),Source and Destination TCP/UDP port
In an example, data packets that meet the criteria as defined by the first mode may be routed through port 110, for example. By utilizing a hash-based load balancing method, data packets related to the same conversation are usually kept together and sent through the same port. Thus, the data packets are usually received at the destination without having to be reordered.
Although the hash-based load balancing method allows the user to set up a predefined set of rules for the hashing algorithm to perform its calculation, the hash-based load balancing method usually does not provide a method for the user to define the flow of data traffic. In other words, the user is not able to define what type of data stream is flowing through which port.
In addition, a hash-based load balancing method usually does not provide for an even distribution of data packets across the available ports. One reason for the potential uneven distribution is that the user is not able to assign a percentage weight to each port. Instead, the system automatically determines the port based on the rule that is met. Accordingly, an overload may occur on one or more ports. For example, a conversation flow that is being routed through port 110 may be fairly large resulting in port 110 being overloaded. Thus, even though other ports may be available to assist in data traffic routing, the hash-based load balancing method does not provide a deterministic method for rebalancing of data traffic to other ports. As a result, data packets may be accidentally dropped.
Accordingly, an arrangement and/or method for performing load balancing without loss of data packets is desirable.